#!/bin/bash

OPENGROK=/mnt/data/opengrok

echo "Updating opengrok index, please wait(a long time)..."
java -Xmx1024m \
-Djava.util.logging.config.file=${OPENGROK}/etc/logging.properties \
-jar ${OPENGROK}/dist/lib/opengrok.jar \
-c /usr/local/bin/ctags \
-s ${OPENGROK}/src \
-d ${OPENGROK}/data \
-H \
-P \
-S \
-G \
-L 200 \
-W ${OPENGROK}/etc/configuration.xml \
-U http://localhost:8080/source

echo "Done, enjoy!"
